package com.example.javabasic.thread.classtwo.singleton.demo4;

//任务类
public abstract class ObserverRunnable implements Runnable {
    //定义监听
    final protected LifeStyleListener listener;
    public ObserverRunnable(final LifeStyleListener listener){
        this.listener = listener;
    }

    //修改通知
    protected void notifyChange(final RunnableEvent event){
        listener.onEvent(event);
    }

}
